import request from '../utils/request';

export const login = (data: { username: string; password: string }) => {
    return request({
        url: '/users/login',
        method: 'post',
        data,
    });
};


// 调用爬虫接口
export const triggerSpider = (params: { start_page: number; end_page: number }) => {
    return request({
        url: "/postbar/spider",
        method: "get",
        params,
    });
};

// 获取贴吧数据接口
export const getForums = () => {
    return request({
        url: "/postbar/forums",
        method: "get",
    });
};
